UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8jPy8ebK11OX1iTgbVyot1Yogjr0b9PvKot7aXKCUvU=' 
WHERE 
  key_id = 'e37a6bb75649ed1be201b59f45db6ec9e51f78dba660c502c4cf2b2c92a0f75c' 
  AND (
    token = '8jPy8ebK11OX1iTgbVyot1Yogjr0b9PvKot7aXKCUvU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018