UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sZ055/mBDs7oqvLcvSHX0nR/+/PtAGSPSqXfkmy4H78=' 
WHERE 
  key_id = 'b0ecfc9f2b376275ad2890dadb7a1a83c048fc581eb556d337e275da5385bf8e' 
  AND (
    token = 'sZ055/mBDs7oqvLcvSHX0nR/+/PtAGSPSqXfkmy4H78=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028