UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sjGOu10vOgSa6GIXwuX4QRUHLNOeA9MnMC5jHt8HNNg='
WHERE
key_id = '79b98d112e049e19221dc44d67b9f68efbdd459bd8ae3873663c2bf706e1bd17'
AND (
token = 'sjGOu10vOgSa6GIXwuX4QRUHLNOeA9MnMC5jHt8HNNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)