UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JeeefA9a9BFzHgzlA3DJiVS/uabjMRalgzlC8eCUh64='
WHERE
key_id = '6541ee2455e8d1e1fc6980aa4df86c90601dd40c8b2b7f4426b9a241fb86e3f8'
AND (
token = 'JeeefA9a9BFzHgzlA3DJiVS/uabjMRalgzlC8eCUh64='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)