UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iCVp9ODpYwEZFswzLuL9MbtjOc10S/ToDhEEROc6Q9I=' 
WHERE 
  key_id = '10e28912bb56f186e3cf82459ccbd9a6d10933d6f59d9be51072aa71a3d38c48' 
  AND (
    token = 'iCVp9ODpYwEZFswzLuL9MbtjOc10S/ToDhEEROc6Q9I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014