UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4zYdh7qLuXQNyv4f+/HARf64tgEaaWS+O6yn9EdiEr4='
WHERE
key_id = '995f49b351325208c60e2fce2b6dd635e0be395872b513731c4899847e6cc2aa'
AND (
token = '4zYdh7qLuXQNyv4f+/HARf64tgEaaWS+O6yn9EdiEr4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)