UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TjBl7r340KBugy5pRhcxTyH/45Cv7S8Ef2Wmp3g4//4=' 
WHERE 
  key_id = 'cd03f1ef96be6dd3a26b6d8cd588ff8ebaa15a59633d520cefeb0f91e889a855' 
  AND (
    token = 'TjBl7r340KBugy5pRhcxTyH/45Cv7S8Ef2Wmp3g4//4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054