UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '08zK5e44n7zX49oOnRoOXBTjXIPEgkhsshV/3rqG7aM='
WHERE
key_id = '60b11549a2eb41f16ceb2cab93fbe3cf6332ead0d48aa0553128370a500e021d'
AND (
token = '08zK5e44n7zX49oOnRoOXBTjXIPEgkhsshV/3rqG7aM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)