UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TQHi+zbV9Yiiuk8mhY1Gx8RJR2Fjhpq/8qvd6tWSjTE=' 
WHERE 
  key_id = 'ee08e6ba1312d3ae83f03a7d4c1f732728d188de39f928ef5921478009d428f8' 
  AND (
    token = 'TQHi+zbV9Yiiuk8mhY1Gx8RJR2Fjhpq/8qvd6tWSjTE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030