UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LiaLccsewGq2tlE2vzzUXh4keAdXi+1bkidn/Rt/Oxc=' 
WHERE 
  key_id = '9652cd26c32b3045c17994927367e428233f4b02c4a85ab51bd4717cff996b2e' 
  AND (
    token = 'LiaLccsewGq2tlE2vzzUXh4keAdXi+1bkidn/Rt/Oxc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027