UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'NnA43uw75UyG22OkTI0lOIN6xbkPgwzoMNEUAAWSaBM=' 
WHERE 
  key_id = '9153915402e6c31b7a16cae851395c118c5401786dc4b3ae0ac6da262b15611d' 
  AND (
    token = 'NnA43uw75UyG22OkTI0lOIN6xbkPgwzoMNEUAAWSaBM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042