UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/XYz2NdzjU/vQZ+GxYNBd4lsGuNrO0pGtW86ceRnmmI='
WHERE
key_id = '4341f11ec3ce702bb4f6bcc26fd72f0b0a764d05cf689209b24e534ff07ef19c'
AND (
token = '/XYz2NdzjU/vQZ+GxYNBd4lsGuNrO0pGtW86ceRnmmI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)