UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L4x4IB7BjpV5y/nTRxQ4QIm9bwJq/Aw31lIZ39yev3Y='
WHERE
key_id = '1116a623e57d7c09ce3e6ac3baf97b93e4596874b9ed8a85bf43ae38b9a4a28f'
AND (
token = 'L4x4IB7BjpV5y/nTRxQ4QIm9bwJq/Aw31lIZ39yev3Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)