UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zOo36vB/GzPueE2pLMiupUqCM79sqgqstdglWSjxL68='
WHERE
key_id = '2dee1f54e6b73c46a9866e34c4edcfdb5d1f8161b9a6a353df262f9b1f801ca6'
AND (
token = 'zOo36vB/GzPueE2pLMiupUqCM79sqgqstdglWSjxL68='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)