UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LLntQFILcQTbWmwe6xTGF0pMC/SM/jAYiRvZHlrplJY=' 
WHERE 
  key_id = 'cfb1dd9286e111ad47213b984717db596c269eedc534dddc029af585894c905f' 
  AND (
    token = 'LLntQFILcQTbWmwe6xTGF0pMC/SM/jAYiRvZHlrplJY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031