UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'f0/ue6tWi9WBKsW2pdw+GGCwp08+mVex8GutdGFcIg4=' 
WHERE 
  key_id = 'c66da9e3d3b52057ce9e0cfa4c4f8798c673201ef39d36ce52ac55a1eb84f660' 
  AND (
    token = 'f0/ue6tWi9WBKsW2pdw+GGCwp08+mVex8GutdGFcIg4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020