UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lfcqpKCSG6P1s6lLhLGsu32iNfqe86Z7KNiAP3PTbt0='
WHERE
key_id = '15ced3a8114b21c00015eafbdcde0a070cd5c461b01f2d5e5afbaa260decdd4d'
AND (
token = 'lfcqpKCSG6P1s6lLhLGsu32iNfqe86Z7KNiAP3PTbt0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)