UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VqgLZireBv1pbis3pCL52r/GesyC0WrK+uiOIedH6H4=' 
WHERE 
  key_id = '9944ba405a77395a01d81abac422f3f0a1860e24c8c727b862bd67a1be6c4234' 
  AND (
    token = 'VqgLZireBv1pbis3pCL52r/GesyC0WrK+uiOIedH6H4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022