UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pUFkJ1v+d9QGV1JEXATEgnSR2vDQ8msRNnXNyDPYaCc='
WHERE
key_id = 'e3de217b5936435511ce624fff5ccc5432c4f606a09cc6110ff9909d85b44714'
AND (
token = 'pUFkJ1v+d9QGV1JEXATEgnSR2vDQ8msRNnXNyDPYaCc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)