UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/WLidVUrxiJnVbfoyULzsI6FQsccIE9YqVgYBFxvX3E=' 
WHERE 
  key_id = '3bd73bde36b6b72ea21bd0342ed6f043f5470add8423a2b8926e53a39bbad106' 
  AND (
    token = '/WLidVUrxiJnVbfoyULzsI6FQsccIE9YqVgYBFxvX3E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045