UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F3doWYZgbuF31Vy6Z/vGxJPNnMr5qUj7mLZwdQEk5Ik='
WHERE
key_id = '8a379e4288e142940b10a539d48a7cfd4746af675ffb52246c8256424528046f'
AND (
token = 'F3doWYZgbuF31Vy6Z/vGxJPNnMr5qUj7mLZwdQEk5Ik='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)