UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jf2WRNObPOzPqsVb/WCaWf/gOqSDmkGKCyjR4vU64UU='
WHERE
key_id = 'ebfe742f3cd1cc6ca709312f598d335d1715a16ceb67e78d029b527c4b85e5fc'
AND (
token = 'Jf2WRNObPOzPqsVb/WCaWf/gOqSDmkGKCyjR4vU64UU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)