UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yu53Imvyjt+o0w6SyGwd8nGP/dnAJXD7DICst6mbd7E='
WHERE
key_id = 'd284e1f841fa7fdb91521e62dcb9c1b4f2ec1ef8e84b060b9798a19471288f4d'
AND (
token = 'Yu53Imvyjt+o0w6SyGwd8nGP/dnAJXD7DICst6mbd7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)