UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'P2O7HrL/jK4TnAv4y0sH1wsnqDaxZ+tzD9xSuBm8xqI=' 
WHERE 
  key_id = '7af88d34e2fe6d5ab79fc557d83b89b94f0f85957fb4389323648e73a9ea9773' 
  AND (
    token = 'P2O7HrL/jK4TnAv4y0sH1wsnqDaxZ+tzD9xSuBm8xqI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00266