UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/igZCdKnjiOL6rg0YmLRMl++9Wn/JqWQtblQG8DnIlk=' 
WHERE 
  key_id = 'a360940da7f82706a1e08770e819869b302980052b0b096ffd662d4cba54fe0f' 
  AND (
    token = '/igZCdKnjiOL6rg0YmLRMl++9Wn/JqWQtblQG8DnIlk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032