UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4NOUHINPBqBrsgg04YWs+zwQelwuwfa9CNpnMEZQTpE='
WHERE
key_id = '15ba03c9b8c2db9232e80ac28aebfe8e9a215a6fa75e1cf11f8ec7a8cbeebcf2'
AND (
token = '4NOUHINPBqBrsgg04YWs+zwQelwuwfa9CNpnMEZQTpE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)