UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'liLsb4p/4wlhhNxa6m/Fn62wfI5Aq9mGFqgrD4lgEvs='
WHERE
key_id = 'e838846b24ca1cbb29b1ecf71387f19b2931243f174c5ec21a03a4dd27b85ae7'
AND (
token = 'liLsb4p/4wlhhNxa6m/Fn62wfI5Aq9mGFqgrD4lgEvs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)