UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RLFjEnoV4AEQtuRRs3qxScyECedzjjulB2q/PQ4oTYg='
WHERE
key_id = '7e7344fb48ca00a0f72e7308e3ffb761d0f6b755d5c939ff3050cb30d0f49b19'
AND (
token = 'RLFjEnoV4AEQtuRRs3qxScyECedzjjulB2q/PQ4oTYg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)