UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uuuKQJxvjfyFqVZVI/LRSB1yfQsfAwFqDFvDb35vJes='
WHERE
key_id = '368fbe3ebe737c2085b45106dbb8e08c76f5ba7a74b2d1f532e18b7cbd282995'
AND (
token = 'uuuKQJxvjfyFqVZVI/LRSB1yfQsfAwFqDFvDb35vJes='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)