UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CmzS19+tMCJrbUwv0/ykD8HpP7qBTN5fW/wwnHX9ZmM='
WHERE
key_id = '23eb62fc6a1c42eb6b3ac6a71911a3de730b50fa034c2d5af09c9b7cb62e2e3f'
AND (
token = 'CmzS19+tMCJrbUwv0/ykD8HpP7qBTN5fW/wwnHX9ZmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)