UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '70uLixJBb3PTqvNyuY7K+lCnvwZkkXFVFvMicMObeiA='
WHERE
key_id = '6368192b28be13710ea2ca7615a841c28d9cd3266b3e957be7e4622b8df62a5d'
AND (
token = '70uLixJBb3PTqvNyuY7K+lCnvwZkkXFVFvMicMObeiA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)