UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sKwwxY+p6jRDDHoCpEq/wsRS3i8iMyVakaicYV35RMY='
WHERE
key_id = '92b2afde2849a1bcb7e98430aef37524541c36ad07b43cdbca6db833ded383e9'
AND (
token = 'sKwwxY+p6jRDDHoCpEq/wsRS3i8iMyVakaicYV35RMY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)