UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q1LHQ+bLJ37RMjLjg+ot657veWITkIN8j1ajZ9Z4bQ4='
WHERE
key_id = '181e2eeaabc4c25848be5bafc1a5fbe159b587519f8e99196f3e3ae4d391007b'
AND (
token = 'Q1LHQ+bLJ37RMjLjg+ot657veWITkIN8j1ajZ9Z4bQ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)