UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oN3oo8cod4yUCO0yFHzFGVXjuBXSZmMQNoXkPNcTpZQ='
WHERE
key_id = '043d150eb574dcd4916e7073964183623b315746fca7db67ed7334fa8d72d19c'
AND (
token = 'oN3oo8cod4yUCO0yFHzFGVXjuBXSZmMQNoXkPNcTpZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)