UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6bnArs3SkZDURIM/WYC3XdstiNR9SaxPDv/We/ZOVw8=' 
WHERE 
  key_id = '9fb26ede21885dd037e05e617a93652b0006d35d18064fda3484204b15845004' 
  AND (
    token = '6bnArs3SkZDURIM/WYC3XdstiNR9SaxPDv/We/ZOVw8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035