UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T61QpqNlN2cpqGgH0Dthm4tsBp//Bk/VWkDNcqWYpro='
WHERE
key_id = '9207efa32f1595b2ee74252c4a5869cd4da9064ce98c7c80cb1cad7fd454b6b1'
AND (
token = 'T61QpqNlN2cpqGgH0Dthm4tsBp//Bk/VWkDNcqWYpro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)