UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FIQdEPj42G1qR83Skl7yojBBroqfVt4PKNSlgoQAMK4=' 
WHERE 
  key_id = 'ceeab1a28947efbd3d2ba7fd833396e02977e8cdf4ba35bb8f58f72fff56b9f2' 
  AND (
    token = 'FIQdEPj42G1qR83Skl7yojBBroqfVt4PKNSlgoQAMK4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014