UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LT2f0tOymFyPTLzyTmB9Mm5nHI3w2SuF9DHwBMZGdtc=' 
WHERE 
  key_id = '98239c14fd696871fcd139672488832ac7984b39e2639a0e584fa67a1b7824ef' 
  AND (
    token = 'LT2f0tOymFyPTLzyTmB9Mm5nHI3w2SuF9DHwBMZGdtc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050