UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zVoAVeya0WvEh4alaEojop49r1SvVuAZtu8FiXqfv20='
WHERE
key_id = 'f769907ea14f31ab272a1a484c5591aff6d0d5f30d747566fe2fa3d82b8ecf01'
AND (
token = 'zVoAVeya0WvEh4alaEojop49r1SvVuAZtu8FiXqfv20='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)