UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MUkQARkuKgBOhNFlrxnD5TeYdBjrH9X+u0KVOIZclP0='
WHERE
key_id = '1dd76f39ea633b3727be299db74e430a816218800c8d9b13198b713fd31454be'
AND (
token = 'MUkQARkuKgBOhNFlrxnD5TeYdBjrH9X+u0KVOIZclP0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)